package com.deyuanyun.pic.settings.service.base;

import com.deyuanyun.pic.settings.controller.dto.MyFileVO;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @author chace.cai   xu
 * @description
 * @date 2016/4/15
 */
public interface UploadService {
    /**
     * 存放文件
     * @param multipartFile
     * @param fileVO
     * @return
     */
    String saveStorageFile(MultipartFile multipartFile, MyFileVO fileVO) throws Exception;

    /**根据附件id来更新附件表里面的业务id*/
    void updateServiceIdByAttId(String id, String businessId);

    /**根据附件id来情况附件关联*/
    void deleteAttach(String id);

    /**
     * 打包下载
     * @param businessId
     * @throws Exception
     */
    void zipBusinessFiles(String businessId,String downFileName, String userAgent, HttpServletResponse response)throws Exception;

    /**
     * 下载
     * @param businessId
     * @throws Exception
     */
    void businessFiles(String businessId,String fileType,String downFileName, String userAgent, HttpServletResponse response)throws Exception;
}
